include makeconfig

OBJS	=head.o kernel.o device.o mm.o lib.o fs.o

zImage_tmp:	$(OBJS)
	$(LD) -TApOS.lds $(OBJS) -o zImage_tmp.o $(LDFLAGS) -lgcc
	$(OBJCOPY) -O binary -S zImage_tmp.o zImage
	rm -f *.o

clean:
	(cd head;make clean)
	(cd kernel;make clean)
	(cd device;make clean)
	(cd mm;make clean)
	(cd lib;make clean)
	(cd fs;make clean)
	rm -f *.o
	rm -f zImage

head.o:
	(cd head;make)
kernel.o:
	(cd kernel;make)
device.o:
	(cd device;make)
mm.o:
	(cd mm;make)
lib.o:
	(cd lib;make)
fs.o:
	(cd fs;make)